<!--设置模块唯一ID-->
<div id="chg_pingmiantu">
<!--标题、面包屑-->
<section class="content-header">
    <h1>
        平面图
        <small>插花馆</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
        <li>插花馆</li>
        <li class="active">平面图</li>
    </ol>
</section>
<!--列表-->
<section class="content pingmiantu">
    <ul class="nav nav-pills nav-stacked col-sm-2 ">
        <li class="active"><a href="#tab_11" data-toggle="tab" aria-expanded="false">A馆</a></li>
        <li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="true">E馆</a></li>
        <li class=""><a href="#tab_3" data-toggle="tab" aria-expanded="false">F馆</a></li>
    </ul>
    <div class="tab-content col-sm-10">
        <div class="tab-pane active" id="tab_11">
            <div class="chg_pingmiantu_calendar"></div>
        </div>
        <div class="tab-pane " id="tab_2">
            <div class="chg_pingmiantu_calendar"></div>
        </div>
        <div class="tab-pane" id="tab_3">
            <div class="chg_pingmiantu_calendar"></div>
        </div>
    </div>
    <div class="clearfix"></div>
</section>

    <script type="text/javascript">
        USEN(function(){
            //模块ID(全系统唯一)
            var id = "#chg_pingmiantu";

            //初始化日历安排表
            var date = new Date();
            var d = date.getDate(),
                    m = date.getMonth(),
                    y = date.getFullYear();

            $(id + ' .nav').on('shown.bs.tab',function(e){
                initFullCalendar()
            });

            initFullCalendar();

            function initFullCalendar(){
                $.ajax({
                    url:"./simdata/common_modify_action.json",
                    success:function(data) {
                        $(id + " .active:visible .chg_pingmiantu_calendar").fullCalendar({
                            header: {
                                left: 'prev,next today',
                                center: 'title',
                                right: 'month,agendaWeek,agendaDay'
                            },
                            buttonText: {
                                today: '今天',
                                month: '月',
                                week: '星期',
                                day: '天'
                            },
                            //Random default events
                            events: [
                                {
                                    title: '签单人-主题-单位',
                                    start: new Date(y, m, 1),
                                    backgroundColor: "#f56954", //red
                                    borderColor: "#f56954" //red
                                },
                                //设置allDay默认整天
                                {
                                    title: '签单人-主题-单位',
                                    start: new Date(y, m, d - 5),
                                    end: new Date(y, m, d - 2),
                                    allDay: true,
                                    backgroundColor: "#f39c12", //yellow
                                    borderColor: "#f39c12" //yellow
                                },
                                //具体到几点几分到几点几分
                                {
                                    title: '签单人-主题-单位',
                                    start: new Date(y, m, d, 8, 30),
                                    end: new Date(y, m, d, 10, 20),
                                    backgroundColor: "#0073b7", //Blue
                                    borderColor: "#0073b7" //Blue
                                }
                            ],
                            eventClick: function (calEvent, jsEvent, view) {
                                USEN.modal({
                                    title: "当前事件",
                                    content: $(this).find(".fc-content").html()
                                })

                            }
                        })

                    }
                })
            }
        })
    </script>
</div>
